package com.hhd.day02


fun main(args: Array<String>) {
    /*100到1区间----------------------------*/
    val range1 = 100 downTo 1
    range1.forEach {
        println("反向整型区间= " + it)
    }

    /*反转区间----------------------------*/
    val range = 100 downTo 1
    val reversedRange = range.reversed()
    reversedRange.forEach {
        println("反转区间= " + it)
    }

    for (i in reversedRange step 10) {
        println("反转区间(step为10)= " + i)
    }


}